package com.vdong.trade.order.facade.enums;

/**
 *
 */
public enum EventEnum {

    DISB_CREATE("创建订单", "DISB_CREATE"),
    DISB_APPLYPAY("申请支付", "DISB_APPLYPAY"),
    DISB_PAY("付款中", "DISB_PAY"),
    DISB_PAYDONE("已付款", "DISB_PAYDONE"),
    DISB_APPLYREFUND("待退款", "DISB_APPLYREFUND"),
    DISB_REFUND("退款中", "DISB_REFUND"),
    DISB_REFUNDDONE("已退款", "DISB_REFUNDDONE"),
    DISB_CANCEL("订单取消", "DISB_CANCEL"),
    DISB_APPLYSETTLEMENT("待结算", "DISB_APPLYSETTLEMENT"),
    DISB_SETTLEMENT("结算中", "DISB_SETTLEMENT"),
    DISB_SETTLEMENTDONE("已结算", "DISB_SETTLEMENTDONE");

    private String state;
    private String value;

    private EventEnum(String state, String value) {
        this.state = state;
        this.value = value;
    }

    public static EventEnum getEnum(String value) {
        for (EventEnum requisitionConstant : EventEnum.values()) {
            if (requisitionConstant.getValue() == value) {
                return requisitionConstant;
            }
        }
        return null;
    }

    public String getValue() {
        return value;
    }

    public String getState() {
        return state;
    }
}
